has_ticket = int(input("请确认是否有票（0/非0）："))
knife_length = int(input("请输入刀的长度："))
if has_ticket != 0:
    if knife_length >=20:
        print("不允许上车")
    else:
        print("安检通过，允许上车")
else:
    print("不允许进门")